package sina.login;

import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class Oauth2Code extends HttpServlet{
 
	public void doGet(HttpServletRequest req,HttpServletResponse res){
		this.doPost(req, res);
	}
	
	public void doPost(HttpServletRequest req,HttpServletResponse res){
		
		Oauth oa=new Oauth();
		try {
			BareBonesBrowserLaunch.openURL(oa.authorize("code",null, null));
		} catch (WeiboException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}

}
